package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ServiceAreasMapper;
import com.ruoyi.system.domain.ServiceAreas;
import com.ruoyi.system.service.IServiceAreasService;

/**
 * 服务区域Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-24
 */
@Service
public class ServiceAreasServiceImpl implements IServiceAreasService 
{
    @Autowired
    private ServiceAreasMapper serviceAreasMapper;

    /**
     * 查询服务区域
     * 
     * @param areaId 服务区域主键
     * @return 服务区域
     */
    @Override
    public ServiceAreas selectServiceAreasByAreaId(Long areaId)
    {
        return serviceAreasMapper.selectServiceAreasByAreaId(areaId);
    }

    /**
     * 查询服务区域列表
     * 
     * @param serviceAreas 服务区域
     * @return 服务区域
     */
    @Override
    public List<ServiceAreas> selectServiceAreasList(ServiceAreas serviceAreas)
    {
        return serviceAreasMapper.selectServiceAreasList(serviceAreas);
    }

    /**
     * 新增服务区域
     * 
     * @param serviceAreas 服务区域
     * @return 结果
     */
    @Override
    public int insertServiceAreas(ServiceAreas serviceAreas)
    {
        return serviceAreasMapper.insertServiceAreas(serviceAreas);
    }

    /**
     * 修改服务区域
     * 
     * @param serviceAreas 服务区域
     * @return 结果
     */
    @Override
    public int updateServiceAreas(ServiceAreas serviceAreas)
    {
        return serviceAreasMapper.updateServiceAreas(serviceAreas);
    }

    /**
     * 批量删除服务区域
     * 
     * @param areaIds 需要删除的服务区域主键
     * @return 结果
     */
    @Override
    public int deleteServiceAreasByAreaIds(Long[] areaIds)
    {
        return serviceAreasMapper.deleteServiceAreasByAreaIds(areaIds);
    }

    /**
     * 删除服务区域信息
     * 
     * @param areaId 服务区域主键
     * @return 结果
     */
    @Override
    public int deleteServiceAreasByAreaId(Long areaId)
    {
        return serviceAreasMapper.deleteServiceAreasByAreaId(areaId);
    }
}
